import 'package:flutter/material.dart';

class TextPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Home'),
        leading: Icon(Icons.menu),
        actions: [Icon(Icons.search), SizedBox(width: 10,), Icon(Icons.settings), SizedBox(width: 20,)],
        centerTitle: true,
        flexibleSpace: Container(),
        elevation: 1.0,
      ),
      body: TextDemo(),
    );
  }
} 

class TextDemo extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    return Column( 
      children: [
        Text('Flutter是谷歌的移动UI框架，可以快速在iOS和Android上构建高质量的原生用户界面。 Flutter可以与现有的代码一起工作。在全世界，Flutter正在被越来越多的开发者和组织使用，并且Flutter是完全免费、开源的。', 
        textDirection: TextDirection.ltr, 
        style: TextStyle(fontSize: 20, color: Colors.red, fontWeight: FontWeight.w700, fontStyle: FontStyle.italic), 
        textAlign: TextAlign.left,  
        maxLines: 3,
        overflow: TextOverflow.ellipsis,
        textScaleFactor: 1.5,),

         
        RichText(text: TextSpan(
          text: "Hello",
          style: TextStyle(fontSize: 40, color: Colors.red), 
          children: [
            TextSpan(
              text: "Flutter", 
              style: TextStyle(fontSize: 40, color: Colors.black), 
            ),
            TextSpan(
              text: "你好啊, flutter", 
              style: TextStyle(fontSize: 40, color: Colors.blue), 

            )
          ],
          
        
        ))
      ],
    );
  }    
}
